package com.enumeration.demo04;

public enum Color implements Behaviour {
    RED(1,"红色"),
    GREEN(2,"绿色"),
    BLUE(3,"蓝色"),
    PINK(4,"粉色"),
    BLACK(5,"黑色");

    private final int num;
    private final String name;

    Color(int num, String name) {
        this.num = num;
        this.name = name;
    }

    public int getNum() {
        return num;
    }

    public String getName() {
        return name;
    }

    @Override
    public String getInfo() {
        return this.name;
    }

    @Override
    public void print() {
        System.out.println(this.num+":"+this.name);
    }
}
